<template>
  <div class="child2">
    <h1>我是子组件child2 - {{arr}} </h1>
    <Child3 />
  </div>
</template>

<script setup>

import Child3 from './Child3.vue'
import { inject } from 'vue'
//内层组件 通过inject接收值
var arr = inject('arr')

</script>

<style>

</style>